#ifndef GUARD_H_
#define GUARD_H_

namespace FURY
{
	namespace STRAGY
	{
		template<typename T>
		struct Guard
		{
		private:
			T*	m_lock;

		public:
			Guard(T& t)
			{
				m_lock = &t;
				m_lock->lock();
			};

			Guard(T* t)
			{
				m_lock = t;
				m_lock->lock();
			};

			~Guard()
			{
				m_lock->unlock();
			};
		};
	};
};

#endif	// GUARD_H_